package com.codeoss.framework.context;

import java.util.List;

public class UserContext {
	private Long resOrgId;
	private Long resUserId;
	private String username;
	private List<String> roleCodeList;
	private List<Long> roleIdList;
	private List<Long> orgIdList;
	private String accessOrgIds;	
	public Long getResOrgId() {
		return resOrgId;
	}
	public void setResOrgId(Long resOrgId) {
		this.resOrgId = resOrgId;
	}
	public Long getResUserId() {
		return resUserId;
	}
	public void setResUserId(Long resUserId) {
		this.resUserId = resUserId;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}

	public List<String> getRoleCodeList() {
		return roleCodeList;
	}
	public void setRoleCodeList(List<String> roleCodeList) {
		this.roleCodeList = roleCodeList;
	}
	
	public List<Long> getOrgIdList() {
		return orgIdList;
	}
	public void setOrgIdList(List<Long> orgIdList) {
		this.orgIdList = orgIdList;
	}
	
	public String getAccessOrgIds() {
		return accessOrgIds;
	}
	public void setAccessOrgIds(String accessOrgIds) {
		this.accessOrgIds = accessOrgIds;
	}
	
	public List<Long> getRoleIdList() {
		return roleIdList;
	}
	public void setRoleIdList(List<Long> roleIdList) {
		this.roleIdList = roleIdList;
	}
	public static UserContext getCurrentUserContext() {
    	YunContext yunContext=YunContext.getCurrentContext();
    	return (UserContext)yunContext.getAttribute("_UserContext_");
    }
}
